<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>实训2.输出三角形</title>
		<script type="text/javascript">
		 document.write("<center>");
            var a=parseInt(prompt("请输入一个整数！！",""));
            if(a>5)
            {
                for(var i=a;i>0;i--)
                {
                    for(var j=0;j<i;j++)
                    {
                        document.write(" * ");
                    }
                    document.write("</br>");
                }
            }
            else
            {
                for(var i=a;i>0;i--)
                {
                    for(var j=0;j<i;j++)
                    {
                        document.write(" * ");
                    }
                    document.write("</br>");
                }
                for(var i=0;i<a;i++)
                {
                    for(var j=0;j<=i;j++)
                    {
                        document.write(" * ");
                    }
                    document.write("</br>");
                }
            }

        document.write("</center>");
			//todo
		</script>

	</head>

	<body>
	</body>

</html>